admin:
  address:
    socket_address:
      address: 0.0.0.0
      port_value: 9901

static_resources:
  listeners:
  - name: listener_1
    address:
      socket_address:
        address: 0.0.0.0
        port_value: 10000
    filter_chains:
    - name: filter1
      # filter_chain_match: 
      filters:
      - name: envoy.filters.network.http_connection_manager
        typed_config:
          "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
          stat_prefix: ingress_http
          access_log:
          - name: envoy.access_loggers.stdout
            typed_config:
              "@type": type.googleapis.com/envoy.extensions.access_loggers.stream.v3.StdoutAccessLog
          http_filters:
          - name: envoy.filters.http.router
            typed_config:
              "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
          route_config:
            name: local_route
            virtual_hosts:
            - name: local_service
              domains: ["*"]
              routes:
              - match:
                  prefix: "/api/"
                route:
                  prefix_rewrite: "/"
                  cluster: service_envoyproxy_io
                  # host_rewrite_literal: www.envoyproxy.io
  - name: listener_2
    address:
      socket_address:
        address: 0.0.0.0
        port_value: 10001
    filter_chains:
    - name: filter2
      # filter_chain_match: 
      filters:
      - name: envoy.filters.network.echo
        typed_config:
          "@type": type.googleapis.com/envoy.extensions.filters.network.echo.v3.Echo          
  - name: listener_3
    address:
      socket_address:
        address: 0.0.0.0
        port_value: 10002
    filter_chains:
    - name: filter3
      filter_chain_match: 
        destination_port: 10002
      filters:
      - name: envoy.filters.network.direct_response
        typed_config:
          "@type": type.googleapis.com/envoy.extensions.filters.network.direct_response.v3.Config
          response: 
            inline_string: |-
                  HTTP/1.1 403
                  server: istio-direct
                  content-length: 275

                  {
                   "msg":"this response directory generated by extensions.filters.network.direct_response.v3.Config",
                   "url":"https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/network/direct_response/v3/config.proto#extensions-filters-network-direct-response-v3-config"
                  }

  clusters:
  - name: service_envoyproxy_io
    type: LOGICAL_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    load_assignment:
      cluster_name: service_envoyproxy_io
      endpoints:
      - lb_endpoints:
        - endpoint:
            address:
              socket_address:
                address: host.docker.internal
                port_value: 8080
    # transport_socket:
    #   name: envoy.transport_sockets.tls
    #   typed_config:
    #     "@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext
    #     sni: www.envoyproxy.io
